package com.totem.base.enums;

import lombok.Getter;

import java.util.Objects;

public enum AppConfigNameEnum {
    SUBSCRIBE("SUBSCRIBE"),
    FUND("FUND"),
    WITHDRAW("WITHDRAW"),
    COLLECTION("COLLECTION"),
    CHARGE("CHARGE"),
    CONVERSION("CONVERSION");

    @Getter
    private final String code;

    AppConfigNameEnum(String code){
        this.code = code;
    }

    public static AppConfigNameEnum byCode(String code) {
        for (AppConfigNameEnum e: AppConfigNameEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }
}
